package com.zq.assistant.func.db.table;


import com.zq.db.annotation.Column;
import com.zq.db.annotation.Table;
import com.zq.db.annotation.Type;
import com.zq.db.bean.CachedReflectSQLBean;

import java.util.Arrays;
import java.util.Date;

/**
 * Created by zhangqiang on 17-6-19.
 */
@Table(name = "t_user")
public class User extends CachedReflectSQLBean {

    @Column(type = Type.TEXT,primaryKey = true)
    private String userId;

    @Column(type = Type.TEXT)
    private String name;

    @Column(type = Type.TEXT)
    private String pwd;

    @Column(type = Type.INTEGER)
    private int age;

    @Column(type = Type.REAL)
    private float weight;

    @Column(type = Type.TEXT)
    private Date birthday;

    @Column(type = Type.BLOB)
    private byte[] head;

    @Column(type = Type.INTEGER)
    private boolean isMan;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", name='" + name + '\'' +
                ", pwd='" + pwd + '\'' +
                ", age=" + age +
                ", weight=" + weight +
                ", birthday=" + birthday +
                ", head=" + Arrays.toString(head) +
                '}';
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public byte[] getHead() {
        return head;
    }

    public void setHead(byte[] head) {
        this.head = head;
    }

    public boolean isMan() {
        return isMan;
    }

    public void setMan(boolean man) {
        isMan = man;
    }
}
